<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- abstractobjectinspector.cpp -->
  <title>QDesignerObjectInspectorInterface 类 | Qt设计师手册</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtdesigner-manual.html">Qt设计师手册</a></td><td ><a href="qtdesigner-module.html">
			C++ <span lang="zh-cn">类</span></a></td><td >QDesignerObjectInspectorInterface</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtdesigner-manual.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">目录</a></h3>
<ul>
<li class="level1"><a href="#public-functions">公用函数</a></li>
<li class="level1"><a href="#public-slots">公用槽函数</a></li>
<li class="level1"><a href="#static-public-members">静态公用成员</a></li>
<li class="level1"><a href="#details">详细信息</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QDesignerObjectInspectorInterface 类</h1>
<!-- $$$QDesignerObjectInspectorInterface-brief -->
<p><a href="qdesignerobjectinspectorinterface.html">QDesignerObjectInspectorInterface</a> 
<span lang="zh-cn">类允许你改变Qt设计师对象检查器的焦点。</span> <a href="#details">
<span lang="zh-cn">更多</span>...</a></p>
<!-- @@@QDesignerObjectInspectorInterface -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign">头文件：</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QDesignerObjectInspectorInterface&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += designer</td></tr><tr><td class="memItemLeft rightAlign topAlign">继承自：</td><td class="memItemRight bottomAlign"> <a href="../qtwidgets/qwidget.html">QWidget</a></td></tr></table></div><ul>
<li><a href="qdesignerobjectinspectorinterface-members.html">所有成员的列表，包括继承成员。</a></li>
<li><a href="qdesignerobjectinspectorinterface-obsolete.html">废弃的成员</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">公用函数</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdesignerobjectinspectorinterface.html#QDesignerObjectInspectorInterface">QDesignerObjectInspectorInterface</a></b>(QWidget *<i>parent</i>, Qt::WindowFlags <i>flags</i> = ...)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qdesignerobjectinspectorinterface.html#dtor.QDesignerObjectInspectorInterface">~QDesignerObjectInspectorInterface</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QDesignerFormEditorInterface *</td><td class="memItemRight bottomAlign"><b><a href="qdesignerobjectinspectorinterface.html#core">core</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn"><font style="vertical-align: inherit;">216个从<a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtwidgets/qwidget.html#public-functions">QWidget</a>继承的公共函数</font></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">公用槽函数</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdesignerobjectinspectorinterface.html#setFormWindow">setFormWindow</a></b>(QDesignerFormWindowInterface *<i>formWindow</i>) = 0</td></tr>
</table></div>
<ul>
<li class="fn"><font style="vertical-align: inherit;"><span lang="zh-cn">19个从</span><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtwidgets/qwidget.html#public-slots">QWidget</a>继承的公共槽</font></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">静态公用成员</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qdesignerobjectinspectorinterface.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<ul>
<li class="fn">5 <span lang="zh-cn">个从<a href="../qtwidgets/qwidget.html#static-public-members">QWidget</a>继承的</span>静态公用成员 </li>
</ul>
<h3><font style="vertical-align: inherit;">其他继承成员</font></h3>
<ul>
<li class="fn"><font style="vertical-align: inherit;">从<a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtwidgets/qwidget.html#properties">QWidget</a>继承的 59 个属性</font></li>
<li class="fn"><font style="vertical-align: inherit;">从<a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtwidgets/qwidget.html#signals">QWidget</a>继承的 3 个信号</font></li>
<li class="fn"><font style="vertical-align: inherit;">从<a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtwidgets/qwidget.html#protected-functions">QWidget</a>继承的 35 个受保护的函数</font></li>
<li class="fn"><font style="vertical-align: inherit;">1 个从<a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtwidgets/qwidget.html#protected-slots">QWidget</a>继承的受保护槽</font></li>
</ul>
<a name="details"></a>
<!-- $$$QDesignerObjectInspectorInterface-description -->
<div class="descr">
<h2 id="details">详细信息</h2>
<p><a href="qdesignerobjectinspectorinterface.html">QDesignerObjectInspectorInterface</a> 
<span lang="zh-cn">类允许你改变Qt设计师对象检查器的焦点。</span></p>
<p><font style="vertical-align: inherit;">您可以使用</font><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerobjectinspectorinterface.html"><font style="vertical-align: inherit;">QDesignerObjectInspectorInterface</font></a><font style="vertical-align: inherit;">来更改当前的窗体窗口选择。例如，在实现自定义小部件插件时：</font></p>
<pre class="cpp">

          <span class="type"><a href="qdesignerobjectinspectorinterface.html#QDesignerObjectInspectorInterface">QDesignerObjectInspectorInterface</a></span> <span class="operator">*</span>objectInspector <span class="operator">=</span> <span class="number">0</span>;
          objectInspector <span class="operator">=</span> formEditor<span class="operator">-</span><span class="operator">&gt;</span>objectInspector();

          <span class="type"><a href="qdesignerformwindowmanagerinterface.html">QDesignerFormWindowManagerInterface</a></span> <span class="operator">*</span>manager <span class="operator">=</span> <span class="number">0</span>;
          manager <span class="operator">=</span> formEditor<span class="operator">-</span><span class="operator">&gt;</span>formWindowManager();

          objectInspector<span class="operator">-</span><span class="operator">&gt;</span>setFormWindow(manager<span class="operator">-</span><span class="operator">&gt;</span>formWindow(<span class="number">0</span>));

</pre>
<p><span lang="zh-cn"><a href="qdesignerobjectinspectorinterface.html">QDesignerObjectInspectorInterface</a></span>类不打算直接实例化。您可以使用<a href="qdesignerformeditorinterface.html#objectInspector">QDesignerFormEditorInterface::objectInspector</a>函数检索Qt 
设计师对象检查器的接口。<a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a>函数的参数提供了一个指向Qt设计师当前<a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a>对象(上面例子中的formEditor)的指针。当实现自定义小部件插件时，你必须子类化<a href="qdesignercustomwidgetinterface.html">QDesignerCustomWidgetInterface</a>来将你的插件暴露给Qt 
设计师。</p>
<p><font style="vertical-align: inherit;">该接口提供了</font><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerobjectinspectorinterface.html#core"><font style="vertical-align: inherit;">core</font></a><font style="vertical-align: inherit;"> () 函数，您可以使用它来检索指向</font><i><font style="vertical-align: inherit;">Qt 设计师</font></i><font style="vertical-align: inherit;">的当前</font><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerformeditorinterface.html"><font style="vertical-align: inherit;">QDesignerFormEditorInterface</font></a><font style="vertical-align: inherit;">对象的指针，以及</font><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerobjectinspectorinterface.html#setFormWindow"><font style="vertical-align: inherit;">setFormWindow</font></a><font style="vertical-align: inherit;"> () 函数，该函数使您可以更改当前的窗体窗口选择。</font></p>
</div>
<p><b><font style="vertical-align: inherit;">请参考</font></b><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerformeditorinterface.html"><font style="vertical-align: inherit;">QDesignerFormEditorInterface</font></a><font style="vertical-align: inherit;">和</font><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerformwindowinterface.html"><font style="vertical-align: inherit;">QDesignerFormWindowInterface</font></a><font style="vertical-align: inherit;">。</font></p>
<!-- @@@QDesignerObjectInspectorInterface -->
<div class="func">
<h2>成员函数文档</h2>
<!-- $$$QDesignerObjectInspectorInterface[overload1]$$$QDesignerObjectInspectorInterfaceQWidget*Qt::WindowFlags -->
<h3 class="fn" id="QDesignerObjectInspectorInterface"><a name="QDesignerObjectInspectorInterface"></a>QDesignerObjectInspectorInterface::<span class="name">QDesignerObjectInspectorInterface</span>(<span class="type"><a href="../qtwidgets/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i>, <span class="type"><a href="../qtcore/qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>flags</i> = ...)</h3>
<p><font style="vertical-align: inherit;">使用给定的<i>parent</i> <span lang="zh-cn">
(</span></font><i><font style="vertical-align: inherit;">父级<span lang="zh-cn">)</span></font></i><font style="vertical-align: inherit;">和指定的窗口<i>flags<span lang="zh-cn">(</span></i></font><i><font style="vertical-align: inherit;">标志<span lang="zh-cn">)</span></font></i><font style="vertical-align: inherit;">构造一个对象检查器接口。</font></p>
<!-- @@@QDesignerObjectInspectorInterface -->
<!-- $$$~QDesignerObjectInspectorInterface[overload1]$$$~QDesignerObjectInspectorInterface -->
<h3 class="fn" id="dtor.QDesignerObjectInspectorInterface"><a name="dtor.QDesignerObjectInspectorInterface"></a><code>[virtual] </code>QDesignerObjectInspectorInterface::<span class="name">~QDesignerObjectInspectorInterface</span>()</h3>
<p><font style="vertical-align: inherit;">销毁对象检查器<span lang="zh-cn">接口</span>。</font></p>
<!-- @@@~QDesignerObjectInspectorInterface -->
<!-- $$$core[overload1]$$$core -->
<h3 class="fn" id="core"><a name="core"></a><code>[virtual] </code><span class="type"><a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a></span> *QDesignerObjectInspectorInterface::<span class="name">core</span>() const</h3>
<p><font style="vertical-align: inherit;">返回一个指向</font><i><font style="vertical-align: inherit;">Qt 设计师</font></i><font style="vertical-align: inherit;">的当前</font><a href="file:///E:/WLL/work/Qt5.12-Document-Trans-in-Chinese/qtdesigner/qdesignerformeditorinterface.html"><font style="vertical-align: inherit;">QDesignerFormEditorInterface</font></a><font style="vertical-align: inherit;">对象的指针。</font></p>
<!-- @@@core -->
<!-- $$$setFormWindow[overload1]$$$setFormWindowQDesignerFormWindowInterface* -->
<h3 class="fn" id="setFormWindow"><a name="setFormWindow"></a><code>[pure virtual slot] </code><span class="type">void</span> QDesignerObjectInspectorInterface::<span class="name">setFormWindow</span>(<span class="type"><a href="qdesignerformwindowinterface.html">QDesignerFormWindowInterface</a></span> *<i>formWindow</i>)</h3>
<p><font style="vertical-align: inherit;">将当前选择的窗体窗口设置为</font><i><font style="vertical-align: inherit;">formWindow</font></i><font style="vertical-align: inherit;">。</font></p>
<!-- @@@setFormWindow -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
